<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../static/layui/css/layui.css"
	media="all">
<link rel="stylesheet" href="../static/css/util.css"
	>
<script type="text/javascript" src="../static/js/jquery-1.12.4.min.js"></script>

<script type="text/javascript" src="../static/js/sys/user/user.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

	<!-- 头部搜索框 -->
	<div id="search-header" >
		<form id="userForm" lay-filter="AreaForm" class="layui-form queryForm" >
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">用户名</label>
					<div class="layui-input-inline">
						<input type="text" name="userName" placeholder="请输入"
							autocomplete="off" class="layui-input" >
					</div>
				</div>
				
				
				
				<div class="layui-inline">
				    <label class="layui-form-label" >性别</label>
				    <div class="layui-input-inline">
				    	<select name="gender" lay-filter="" lay-search>
						      <option value="">请选择性别</option>
						      <option value="M">男</option>
						      <option value="W">女</option>
				       </select>    
				      </div>
				  </div> 
				    
				<div class="layui-inline">
					<label class="layui-form-label">手机号</label>
					<div class="layui-input-inline">
						<input type="text" name="phone" placeholder="请输入手机号"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				

					<div class="layui-inline">
				    <label class="layui-form-label" >状态</label>
				    <div class="layui-input-inline">
				    	<select name="useable">
						      <option value="">请选择是否可用</option>
						      <option value="1">可用</option>
						      <option value="0">禁用</option>
				       </select>    
				      </div>
				  </div> 
	
				<div class="layui-inline">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline" style="width: 200px">
						<button class="layui-btn" lay-submit="" lay-filter="userQueryBtn">
							<i class="layui-icon layui-icon-search"></i> 查询
						</button>
						<button  id="reset" class="layui-btn" type="reset" style="">
							<i class="layui-icon layui-icon-refresh"></i> 重置
						</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<!-- 添加模态框 -->
	<div class="definedModal" id="editForm">
		<form class="layui-form" id="editUserForm" lay-filter="editUserForm">
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-inline">
					<input type="hidden" name="userId" lay-verify="userId" value="">
					<input type="text" name="userName" 
						lay-verify="userName" placeholder="请输入用户名" autocomplete="off"
						class="layui-input" id="userName">
				</div>
				<div class="layui-form-mid layui-word-aux"> </div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">密码</label>
				<div class="layui-input-inline">
					<input type="password" name="password" 
						lay-verify="pass"
						 placeholder="请输入密码" autocomplete="off"
						class="layui-input">
				</div>
				<div class="layui-form-mid layui-word-aux"> </div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">性别</label>
				<div class="layui-input-block">
					<input type="radio" name="gender" value="M" title="男"> 
					<input type="radio" name="gender" value="W" title="女" checked>
				</div>
			</div>
		
			<div class="layui-form-item">
				<label class="layui-form-label">手机号</label>
				<div class="layui-input-inline">
					<input type="text" name="phone" required
						lay-verify="userPhone" placeholder="请输入手机号" autocomplete="off"
						class="layui-input">
				</div>
				<div class="layui-form-mid layui-word-aux"> </div>
			</div>
			
			
			<!--************这里是上传图片的代码***************-->
    <!--************这里添加的隐藏的输入框，用来传递images的参数***************-->
			    <div class="layui-form-item">
			        <label class="layui-form-label ">用户头像</label>
			        <div class="layui-upload">
			            <button type="button" class="layui-btn" id="test1">上传图片</button>
			            <div class="layui-upload-list" align="center">
			                <img class="layui-upload-img" id="demo1"  style="width: 200px" style="height: 200px"/>
			                <p id="demoText"></p>
			            </div>
			        </div>
			    </div>

			
			 <div class="layui-form-item">
				<label class="layui-form-label">是否可用</label>
				<div class="layui-input-block">
					<input type="radio" name="useable" value="1" title="可用"> 
					<input type="radio" name="useable" value="0" title="禁用" checked>
				</div>
			</div>
			
			
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button type="submit" class="layui-btn" lay-submit=""
						lay-filter="userBtn">立即提交</button>
					<button type="button" class="layui-btn modalClose">关闭</button>
				</div>
			</div>
		</form>
	</div>

	<table class="layui-hide" id="test" lay-filter="test">

	</table>




	<script type="text/html" id="toolbarDemo">
  <div class="layui-btn-container">
    <button class="layui-btn layui-btn-sm" lay-event="addUserModal">添加</button>
    <button class="layui-btn layui-btn-sm" lay-event="getCheckLength">删除</button>
    <button class="layui-btn layui-btn-sm" lay-event="updateUserModal">修改</button>
  </div>
</script>



	<!-- 状态 -->
	<script type="text/html" id="checkboxTpl">
    		<input type="checkbox" value="{{d.userId}}" lay-skin="switch" lay-text="可用|禁用" {{d.useable=='1'?'checked':''}} lay-filter="userStatus"/>
	</script>
	


	<script src="../static/layui/layui.js" charset="utf-8"></script>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

</body>
</html>